import { toRoute } from '@/utils'

export default defineNuxtPlugin(nuxtApp => {
  // 定义全局方法
  const toRoutePath = (path, query = {}, _blank = false) => {
    toRoute(nuxtApp.$router, path, query, _blank)
  }
  nuxtApp.provide('toRoutePath',toRoutePath)
})
